function videos(vid)
% Create a video input object.
%video = videoinput('winvideo',1,'YUY2_640x480');

% Create the image object in which you want to
% display the video preview data.
vidRes = get(vid, 'VideoResolution');
imWidth = vidRes(1);
imHeight = vidRes(2);
nBands = get(vid, 'NumberOfBands');
hImage = image( zeros(imHeight, imWidth, nBands) );
set(vid,'ReturnedColorSpace','rgb');
preview(vid, hImage);

end